﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Domep.Server.BusinessObjects;

namespace Domep.Server.Contracts
{
    [DataContract]
    public class ApplianceModelPresentation
    {
        [DataMember]
        private string name;
        [DataMember]
        private string brand;
        [DataMember]
        private ApplianceType type;
        [DataMember]
        private List<string> functionalities;


        public string Name { get { return name; } }
        public string Brand { get { return brand; } }
        public ApplianceType Type { get { return type; } }
        public List<String> Functionalities { get { return functionalities; } }

        public ApplianceModelPresentation(ApplianceModel applianceModel)
        {
            name = applianceModel.Name;
            brand = applianceModel.Brand;
            type = applianceModel.Type;
            this.functionalities = new List<string>();
            foreach (Functionality f in applianceModel.Functionalities)
                functionalities.Add(f.Name);
        }
    }
}
